public class Book {
    private String bookName;
    private String writer;
    private int monthlySales;

    public Book(String bookName, String writer, int monthlySales) {
        this.bookName = bookName;
        this.writer = writer;
        this.monthlySales = monthlySales;
    }
    public void printBook(){
        System.out.println("书名："+this.bookName+"  作者："+this.writer+"  月销量："+this.monthlySales);
    }

    public static void main(String[] args) {
        Book book1=new Book("红楼梦","曹雪芹",1000);
        book1.printBook();
        Book book2=new Book("挪威的森林","村上春树",2000);
        book2.printBook();
    }

}
